import request from '../utils/request';


export function getUserCardCount(data) {
  return request({
    url: 'electronic-card/get-user-card-count',
    method: 'get',
    data: data,
  });
}

export function list(data) {
  return request({
    url: 'electronic-card/list',
    method: 'get',
    data: data,
  });
}

export function shareLoglist(data) {
  return request({
    url: 'electronic-card/share-log-list',
    method: 'get',
    data: data,
  });
}

export function shareList(data) {
  return request({
    url: 'electronic-card/share-list',
    method: 'get',
    data: data,
  });
}

//分享卡券
export function shareCard(data) {
  return request({
    url: '/electronic-card/share-card',
    method: 'post',
    data
  });
}

//领取卡券
export function claimCard(data) {
  return request({
    url: '/electronic-card/claim-card',
    method: 'post',
    data
  });
}

export function cardDetail(data) {
  return request({
    url: 'electronic-card/detail',
    method: 'get',
    data: data,
  });
}

//撤销分享
export function cancelShare(data) {
  return request({
    url: '/electronic-card/cancel-share',
    method: 'post',
    data
  });
}